package com.eleadin.ruleengine.service.base;

import com.eleadin.ruleengine.utils.IdGeneraterUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class BaseService {

    @Autowired
    private IdGeneraterUtil idGeneraterUtil;

    /**
     * 唯一标识id
     *
     * @return
     */
    public Long generateId() {
        //调用Gen来生成一个唯一的Id
        return idGeneraterUtil.nextId();
    }

    public String nextIdString() {
        //调用Gen来生成一个唯一的Id
        return idGeneraterUtil.nextIdString();
    }

}
